package BUG;

import java.lang.reflect.Method;
import java.util.Date;

public class GetMethonNames {
	public static void main(String[] args) {
		try {
			String a = new Date().getClass().getName();
			Class<?> clazz = Class.forName(a);
			Method[] methods = clazz.getMethods();
			for (Method method : methods) {
				String methodName = method.getName();
				System.out.println("方法名称:" + methodName);
				Class<?>[] parameterTypes = method.getParameterTypes();
				for (Class<?> clas : parameterTypes) {
					String parameterName = clas.getName();
					System.out.println("参数名称:" + parameterName);
				}
				System.out.println("*****************************");
			}
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
}
